package com.foreknow.service.impl;

import com.foreknow.dao.RegistLevelMapper;
import com.foreknow.entity.RegistLevel;
import com.foreknow.service.RegistLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RegisteLevelServiceImp implements RegistLevelService {
    @Autowired
    private RegistLevelMapper levelMapper;
    @Override
    public int deleteById(Integer id) {
        return levelMapper.deleteByPrimaryKey(id);
    }

    @Override
    public Integer deleteRegisteByid(List<Integer> ids) {
        return levelMapper.deleteRegisteById(ids);
    }

    @Override
    public int insertUser(RegistLevel registLevel) {
        return levelMapper.insert(registLevel);
    }

    @Override
    public RegistLevel queryById(int id) {
        return levelMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<RegistLevel> quetyAll(RegistLevel registLevel) {
        return levelMapper.quetyAll(registLevel);
    }

    @Override
    public int updateById(RegistLevel registLevel) {
        return levelMapper.updateByPrimaryKeySelective(registLevel);
    }
}
